package com.hzhjhh.view.manageView.menus.purchase;

import java.awt.Frame;

import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JTextField;
import javax.swing.JScrollPane;
import java.awt.Color;
import javax.swing.JButton;
import java.util.Vector;
import javax.swing.table.JTableHeader;

import com.hzhjhh.util.TimerScheduleTaskUtil;
import com.hzhjhh.view.manageView.menus.purchase.payment.BillNum;
import com.hzhjhh.view.manageView.menus.purchase.payment.Creator;
import com.hzhjhh.view.manageView.menus.purchase.payment.Currency;
import com.hzhjhh.view.manageView.menus.purchase.payment.Date;
import com.hzhjhh.view.manageView.menus.purchase.payment.DeleteBt;
import com.hzhjhh.view.manageView.menus.purchase.payment.EnsureBt;
import com.hzhjhh.view.manageView.menus.purchase.payment.Handler;
import com.hzhjhh.view.manageView.menus.purchase.payment.OrderId;
import com.hzhjhh.view.manageView.menus.purchase.payment.PayAmt;
import com.hzhjhh.view.manageView.menus.purchase.payment.PayOrderTitle;
import com.hzhjhh.view.manageView.menus.purchase.payment.PayType;
import com.hzhjhh.view.manageView.menus.purchase.payment.QuitBt;
import com.hzhjhh.view.manageView.menus.purchase.payment.SubmitBt;
import com.hzhjhh.view.manageView.menus.purchase.payment.Supplier;

import lombok.Getter;
import lombok.Setter;

import javax.swing.JTable;

/**
 * 菜单栏初始化-采购-付款单弹出框
 * 
 * @author 12083
 *
 */
@Getter
@Setter
public class PaymentOrderDialog extends JDialog {
	JPanel panel1 = new JPanel();
	JLabel lbOrderId = OrderId.lbInit();
	JLabel lbPayType = PayType.lbInit();
	JLabel lbCurrency = Currency.lbInit();
	JLabel lbBillNum = BillNum.lbInit();
	JLabel lbDate = Date.lbInit();
	JLabel lbHandler = Handler.lbInit();
	JLabel lbCreator = Creator.lbInit();
	JLabel lbSupplier = Supplier.lbInit();
	JTextField txfOrderId = OrderId.lbTxf();
	JTextField txfSupplier = Supplier.lbTxf();
	JTextField txfCurrency = Currency.lbTxf();
	JTextField txfPayAmt = PayAmt.lbTxf();
	JTextField txfBillNum = BillNum.lbTxf();
	JTextField txfDate = Date.lbTxf();
	JTextField txfHandler = Handler.txfInit();
	JTextField txfCreator = Creator.txfInit();
	JScrollPane jScrollPane1 = new JScrollPane();
	JLabel payOrderTitle = PayOrderTitle.init();
	
	JButton btSubmit = SubmitBt.btInit(this);
	JButton btDelete = DeleteBt.btInit(this);
	JButton btQuit = QuitBt.btInit(this);
	JButton btEnsure = EnsureBt.btInit(this);

	JTable jTable1 = new JTable();
	JTableHeader jTableHeader1 = jTable1.getTableHeader();

	Vector colnames = new Vector(); // 表头
	Vector colnames1 = new Vector();
	Vector colnames2 = new Vector();

	public PaymentOrderDialog(Frame owner, String title, boolean modal) {
		super(owner, title, modal);
		try {
			setDefaultCloseOperation(DISPOSE_ON_CLOSE);
			jbInit();
			pack();
		} catch (Exception exception) {
			exception.printStackTrace();
		}
	}

	public PaymentOrderDialog() {
		this(new Frame(), "PaymentList", false);
		this.setSize(800, 500);
		this.setVisible(true);
		this.setLocation(100, 100);
		this.setTitle("付款单");
	}

	private void jbInit() throws Exception {
		panel1.setLayout(null);
		TimerScheduleTaskUtil.time2Show(txfDate);

		jScrollPane1.setBounds(new Rectangle(230, 17, 549, 354));
		this.getContentPane().setBackground(Color.pink);
		panel1.setBackground(Color.pink);
		getContentPane().add(panel1);
		panel1.add(lbSupplier);
		panel1.add(txfCurrency);
		panel1.add(lbCurrency);
		panel1.add(txfSupplier);
		panel1.add(txfOrderId);
		panel1.add(lbOrderId);
		panel1.add(payOrderTitle);
		panel1.add(jScrollPane1);
		panel1.add(txfPayAmt);
		panel1.add(lbCreator);
		panel1.add(txfCreator);
		panel1.add(txfHandler);
		panel1.add(lbHandler);
		panel1.add(lbDate);
		panel1.add(txfDate);
		panel1.add(txfBillNum);
		panel1.add(lbBillNum);
		panel1.add(lbPayType); // colnames.add("进货单号");
		panel1.add(lbPayAmt); // colnames.add("供货商");
		panel1.add(txfPayType); // colnames.add("货币");
		panel1.add(btDelete);
		panel1.add(btEnsure);
		panel1.add(btSubmit);
		panel1.add(btQuit);
	}

	Vector<Vector<String>> rowDatas = new Vector();
	JLabel lbPayAmt = PayAmt.lbInit();
	JTextField txfPayType = PayType.lbTxf();

}
